Page({
	data: {
		animationData: {},
		a : 'aaaaaa',
		hide : false
	},
	onLoad: function(options) {

	},
	onReady: function() {

	},
	onShow: function() {

		/*	var animation = wx.createAnimation({
   		   duration: 10000,
  		   timingFunction: 'linear',
    	})
		
		//animation.scale(2,2).rotate(45).step()
		animation.translateX(50).step();
		
		this.setData({
     		animationData:animation.export()
    	})
		
		this.setData({
     		animationData:animation.export()
    	})
		*/

		var animation = wx.createAnimation({
			duration: 1000,
			timingFunction: 'ease',
		})
		this.animation = animation
		this.setData({
			animationData: animation.export()
		})
		var n = 0;
		var m = true;
		//连续动画需要添加定时器,所传参数每次+1就行
		setInterval(function() {
			if(n == 0) {
				n = n + 1;
				this.animation.translateX(n*200).step()
			} else {
				n = 0
				this.animation.translateX(n*200).step({ duration: 0 })
			}
			

			this.setData({
				animationData: this.animation.export()
			})
		}.bind(this), 1000)
	},
	
	onHide: function() {
		// 页面隐藏
	},

	onUnload: function() {
		// 页面关闭

	},
	
	hide : function(e) {
		this.setData({
			hide : true
		});
	},
	
	show : function(e) {
		this.setData({
			hide : false
		})
	},
	
	change : function(e) {
		var str = new Date().getMilliseconds();
		this.setData({
			a : str
		})
	},
	
	test : function(e) {
		console.log(11111);
	}

})